#!/usr/bin/env bash
# vim:  fdm=marker fmr=[[[,]]] cms=\ #%s#

HELLO()
{ #[[[#
    $CLIENT $ADDR HELLO "hello world!"
} #]]]#

main()
{ #[[[#
    if [[ ! -x $CLIENT ]]
    then
        echo "client not found"
        return 1
    fi

    local option
    read -p "\
Services:
    1) HELLO
Input: " option
    if [[ -z $option ]]
    then
        echo  "Error: input invalid"
        return 1
    fi
    case $option in
    1) HELLO ;;
    *)
        echo "Error: option($option) not supported"
        return 1
        ;;
    esac
} #]]]#

CLIENT=client
ADDR=localhost:20000

main
exit $?
